package myJs.myPkg

import myJs.myPkg.jquery.JQuery
import myJs.myPkg.jsext._

import scala.scalajs.js
import scala.language.implicitConversions
import scala.scalajs.js.JSConverters._


/**
 * Created by yz on 2019/3/14
 */

@js.native
trait Draggable extends js.Object {



}

@js.native
trait DraggableJQuery extends js.Object {

  def draggable(options: DraggableOptions): JQuery = scalajs.js.native

}

object DraggableOptions extends DraggableOptionsBuilder(noOpts)

class DraggableOptionsBuilder(val dict: OptMap) extends JSOptionBuilder[DraggableOptions, DraggableOptionsBuilder](new DraggableOptionsBuilder(_)) {

  def cursor(v: String) = jsOpt("cursor", v)

  def handle(v: String) = jsOpt("handle", v)

}

trait DraggableOptions extends js.Object {

}


trait DraggableJQueryImplicits {
  implicit def implicitDraggableJQuery(jq: JQuery) = {
    jq.asInstanceOf[DraggableJQuery]
  }
}
